package main

import "fmt"

var complete chan int = make(chan int)

func loop() {
	for i := 0; i < 10; i++ {
		fmt.Print(i, "	")
	}
	complete <- 0
}

func main() {

	var message = make(chan string)
	go func() {
		message <- "ping"
	}()

	var msg = <-message
	fmt.Println(msg)

	go loop()
	loop()
	<-complete

}
